package svc

import (
	"doctor-package/api/internal/config"
	"doctor-package/packagerpc/packagerpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config     config.Config
	PackageRpc packagerpcclient.Packagerpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		PackageRpc: packagerpcclient.NewPackagerpc(zrpc.MustNewClient(c.PackageRpc)),
	}
}
